package client

type Listener interface {
	Listen(reqId string, submitUri string, response string, serverError error) error
}

type ListenerFunc func (reqId string, submitUri string, response string, serverError error) error

func (f ListenerFunc) Listen(reqId string, submitUri string, response string, serverError error) error {
	return f(reqId, submitUri, response, serverError)
}

type ListenerAsynFunc func (reqId string, submitUri string, response string, serverError error) error

func (f ListenerAsynFunc) Listen(reqId string, submitUri string, response string, serverError error) error {
	go f(reqId, submitUri, response, serverError)
	return nil
}